/summon villager ~ ~2 ~ {VillagerData:{profession:librarian,level:5,type:plains},Offers:{Recipes:[
{buy:{id:melon,Count:32}
,buyB:{id:pumpkin,Count:64}
,sell:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 1\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:0.6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]},maxUses:9999999}},

{buy:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 1\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:0.6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:pumpkin,Count:4,tag:
{display:{Name:"{\"text\":\"Melonpkin Upgrade\",\"color\":\"dark_green\"}"}}}
,sell:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 2\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1.2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 2\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1.2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:pumpkin,Count:8,tag:
{display:{Name:"{\"text\":\"Melonpkin Upgrade\",\"color\":\"dark_green\"}"}}}
,sell:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 3\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1.8,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 3\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1.8,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:pumpkin,Count:12,tag:
{display:{Name:"{\"text\":\"Melonpkin Upgrade\",\"color\":\"dark_green\"}"}}}
,sell:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 4\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:2.4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 4\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:2.4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:pumpkin,Count:24,tag:
{display:{Name:"{\"text\":\"Melonpkin Upgrade\",\"color\":\"dark_green\"}"}}}
,sell:{id:music_disc_mall,Count:1,tag:
{display:{Name:"{\"text\":\"Melonpkin Talisman Level 5\",\"color\":\"dark_green\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999}]}}